﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserEdit.aspx.cs" Inherits="Business_Cisoft3G_UserManage3G_UserEdit" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>用户修改</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/font.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/style_ts.css" rel="stylesheet" type="text/css" />
 
    
    <script type="text/javascript" src="../../../js/jquery-1.4.2.min.js"></script>
    
    <script language="javascript" type="text/javascript">


        //确认用户真实姓名
        function chktxtRealName(obj) {
            var strrealname = obj.value;
            document.getElementById("errspan1forrealname").className = "";

            changerealnamePrompt("&nbsp;");
            if (strrealname == "" || strrealname == null) {
                document.getElementById("txtRealName").style.borderColor = 'red';
                changerealnamePrompt(document.getElementById("errspan1forrealname").innerHTML);
                document.getElementById("errspan1forrealname").className = 'error';
                return false;
            }
            return true;

        }
        function changerealnamePrompt(strforrealname) {
            document.getElementById("divMessageforrealname").style.display = "";
            document.getElementById("failinfoforrealname").innerHTML = strforrealname;
        }
        function fLen(Obj) {
            var nCNLenth = 0;
            var nLenth = Obj.length;
            for (var i = 0; i < nLenth; i++) {
                if (Obj.charCodeAt(i) > 255) {
                    nCNLenth += 2;
                } else {
                    nCNLenth++;
                }
            }
            return nCNLenth;
        }

        //验证手机号码
        function checkPhone(obj) {
            var flag = false;
            var mobile = obj.value;
            if ($.trim(mobile) == '') {
                $('#lblPhone').text("请输入手机号码");
                flag = false;
            }
            else {
                var reg = /\d{11}/;
                if (reg.test(mobile)) {
                    $('#lblPhone').text("");
                    if ($('#hid_mobile').val() == mobile) {
                        flag = true;
                    }
                    else {
                        $.get("UserIsExsistHandler.ashx?om=" + $('#hid_mobile').val() + "&nm=" + mobile,
                      function(data) {
                          if (data == "0") {
                              flag = true;
                          }
                          if (data == "1") {
                              $('#lblPhone').text("该手机号码已经存在！");
                              flag = false;
                          }
                      });
                    }
                }
                else {
                    $('#lblPhone').text("请输入正确的手机号码");
                    flag = false;
                }
            }
            return flag;
        }
        
        //终验
        function zongcheck() {

            var zongcheckforall = true;

            zongcheckforall = chktxtRealName(document.getElementById("txtRealName"));

            if (!zongcheckforall) {
                return zongcheckforall;
            }

            zongcheckforall = checkPhone(document.getElementById("txtPhone"));

            if (!zongcheckforall) {
                return zongcheckforall;
            }

        }
    </script>
   <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" runat="server" id="hid_mobile" />
    
    <asp:ScriptManager ID="Scriptmanager1" runat="server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true">
    </asp:ScriptManager>
    <!--第一行-->
    <div class="position_list">
        <div class="position_left_list">
        </div>
        <div class="position_con_list">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="30">
                        <img src="../../../Images/3G/icon21.gif" width="14" height="14" alt="" />
                    </td>
                    <td class="cyan12">
                        修改管理员
                    </td>
                </tr>
            </table>
        </div>
        <div class="position_right_list">
        </div>
    </div>
    <!--系统温馨提示栏-->
    <div class="search_list">
        <div class="search_top_list">
            <div class="search_topleft_list">
            </div>
            <!--  查询     -->
            <div class="search_topbg_list">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="30" align="left" valign="middle" style="padding-top: 4px;">
                            <img src="../../../Images/3G/icon_logo.gif" width="22" height="22" />
                        </td>
                        <td width="100" class="cyan13_bold" style="padding-top: 5px;">
                            系统温馨提示栏
                        </td>
                        <td style="padding-top: 5px;">
                        </td>
                    </tr>
                </table>
            </div>
            <div class="search_topright_list">
            </div>
        </div>
    </div>
      
    <!--   查询条件    -->
    <div class="index_search_con_list">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="73798f" id="table1" class="white12_normal" style="padding-left: 10px;">
            
            
            <!--真实姓名-->
            <tr bgcolor="#1E3541" style="height: 30px;">
                <td width="120" valign="middle" style="text-align: right; color: White">
                    <span style="color: Red">*</span>真实姓名：
                </td>
                <td width="300" valign="middle" style="text-align: left; padding-left:10px;">
                    <asp:TextBox ID="txtRealName" runat="server" Width="100%" MaxLength="20" onfocus="this.style.borderColor='#000000'"
                        onblur="this.style.borderColor='#A3BFA8';chktxtRealName(this);"></asp:TextBox>
                    <div id="divMessageforrealname" style="display: none;">
                        <span id="failinfoforrealname" style="color: Red"></span>
                    </div>
                </td>
                <td class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;<span id="errspan1forrealname" class="cyan12">请填写真实姓名。</span><br />
                </td>
            </tr>
            <!--手机号码-->
            <tr bgcolor="#1E3541" style="height: 30px;">
                <td width="120" valign="middle" style="text-align: right; color: White">
                    <span style="color: Red">*</span>手机号码：
                </td>
                <td width="300" valign="middle" style="text-align: left; padding-left:10px;">
                    <asp:TextBox ID="txtPhone" runat="server" Width="100%" MaxLength="20" onfocus="this.style.borderColor='#000000'"
                        onblur="this.style.borderColor='#A3BFA8';checkPhone(this);"></asp:TextBox>
                    <asp:Label ID="lblPhone" runat="server" Style="color: Red"></asp:Label>
                </td>
                <td class="rightforregister" class="cyan12">
                    <span id="Span3" class="cyan12">&nbsp;&nbsp;&nbsp;&nbsp;请填写手机号码。</span><br />
                </td>
            </tr>
            <!--所属组名称-->
            <tr bgcolor="#1E3541" style="height: 30px;">
                <td width="120" valign="middle" style="text-align: right; color: White">
                    <span style="color: Red">*</span>请选择角色：
                </td>
                <td width="300" valign="middle" style="text-align: left; padding-left:10px;">
                    <asp:DropDownList ID="ddlUserGroupParent" runat="server">
                    </asp:DropDownList>
                </td>
                <td class="cyan12">
                    <span id="Span1">&nbsp;&nbsp;&nbsp;&nbsp;请选择角色</span><br />
                </td>
            </tr>
            <%--按钮提交--%>
            <tr bgcolor="#1E3541" style="height: 30px;">
                <td width="120" valign="middle" style="text-align: right;">
                    
                </td>
                <td width="300" valign="middle" style="text-align: left; padding-left:10px;">
                    <asp:Button ID="btnUpdate" runat="server" Text="" ToolTip="修改"
                        OnClick="ibtnedit_Click" />
                    <asp:Button ID="btnBack" runat="server" Text="" ToolTip="返回" OnClick="ibtnedit_Click"
                        CausesValidation="false" Visible="false"/>
                        <input type="button" id="btnBack" onclick="window.location.href='UserManage3G.aspx'" ></input>
                </td>
                <td class="rightforregister">
                    
                </td>
            </tr>
            
            
        </table>
    
    
    
    </div>
    <div class="search_bottom_list">
        <div class="search_bottomleft_list">
        </div>
        <div class="search_bottombg_list">
        </div>
        <div class="search_bottomright_list">
        </div>
    </div>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="LinkButton1"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="false" PopupDragHandleControlID="Panel2" CancelControlID="btnCloseAll2">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="Panel1" runat="server" Style="display: none; width: 26%;
        vertical-align: middle;">
        <div class="attention_delete">
            <asp:Panel ID="Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid_delete">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    提示信息
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll2" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="Panel3" runat="server">
                    <table border="1" runat="server" id="table2" cellpadding="5" cellspacing="0" bordercolor="#0e62a7"
                        style="width: 100%; text-align: center; border-collapse: collapse;">
                        <tr>
                            <td style="text-align: Center">
                                <asp:Label ID="lblTS" runat="server" Text=""></asp:Label>
                                <asp:Button ID="btnBack_ts" runat="server" ToolTip="返回列表页" Visible="false"/>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    <asp:LinkButton ID="LinkButton1" runat="server"></asp:LinkButton>
    </form>
</body>
</html>
